//  
//   JKLrcLabel.m
//   QQMusic
//  
//   Created by albert on 16/4/9.
//   Copyright (c) 2016年 albert. All rights reserved.
//  

#import "JKLrcLabel.h"

@implementation JKLrcLabel

- (void)setProgress:(CGFloat)progress{
    _progress = progress;
    
    [self setNeedsDisplay];
}

- (void)drawRect:(CGRect)rect {
    [super drawRect:rect];
    
    //  1、获取需要画的区域
    CGRect fillRect = CGRectMake(0, 0, self.bounds.size.width * self.progress, self.bounds.size.height);
    
    //  2、设置颜色
    [[UIColor redColor] set];
    
    //  3、添加区域
    //  UIRectFill(fillRect);
    UIRectFillUsingBlendMode(fillRect, kCGBlendModeSourceIn);
}
@end
